//
// Created by konglinglong on 2020/9/15.
//

#ifndef O5G_SRC_O5GRAN_LCORE_INCLUDE_COMMDEF_H_
#define O5G_SRC_O5GRAN_LCORE_INCLUDE_COMMDEF_H_

#include "commMsg.h"
#include "indMsg.h"
#include "l1ApiMsg.h"
#include "l3L2Msg.h"

enum
{
    RAN_APP_TYPE_L1,
    RAN_APP_TYPE_L2,
    RAN_APP_TYPE_L2_CU,
    RAN_APP_TYPE_L2_DU,
    RAN_APP_TYPE_L3,
    RAN_APP_TYPE_OM,
    RAN_APP_TYPE_BUTT
};
extern const char* gRanAppTypeStrTable[];

enum
{
    FUNC_SPLIT_OPT_0, //Integrated Small Cell
    FUNC_SPLIT_OPT_1, //RRC-PCDP split

/*
    Option 3 PDCP-RLC split
    Option 2-1 Split U-plane only (3C like split): In this split option, RRC, PDCP are in the central unit. RLC, MAC, physical layer and RF are in the distributed unit.
    Option 2-2: In this split option, RRC, PDCP are in the central unit. RLC, MAC, physical layer and RF are in the distributed unit.  In addition, this option can be achieved by separating the RRC and PDCP for the CP stack and the PDCP for the UP stack into different central entities.
*/
    FUNC_SPLIT_OPT_2_1,
    FUNC_SPLIT_OPT_2_2,

/*
    Option 3 High RLC-Low RLC split
    Option 3-1 Split based on ARQ
    Option 3-2 Split based on TX RLC and RX RLC
*/
    FUNC_SPLIT_OPT_3_1,
    FUNC_SPLIT_OPT_3_2,

    FUNC_SPLIT_OPT_4, //RLC-MAC split
    FUNC_SPLIT_OPT_5, //High MAC-Low MAC split
    FUNC_SPLIT_OPT_6, //MAC-PHY split

/*
    Option 7 High PHY-Low PHY split
    Option 7-1 In this option the UL, FFT, CP removal and possibly PRACH filtering functions reside in the DU, the rest of PHY functions reside in the CU. In the DL, iFFT and CP addition functions reside in the DU, the rest of PHY functions reside in the CU.
    Option 7-2 In this option the UL, FFT, CP removal, resource de-mapping and possibly pre-filtering functions reside in the DU, the rest of PHY functions reside in the CU. In the DL, iFFT, CP addition, resource mapping and precoding functions reside in the DU, the rest of PHY functions reside in the CU.
    Option 7-3 (Only for DL): Only the encoder resides in the CU, and the rest of PHY functions reside in the DU.
*/
    FUNC_SPLIT_OPT_7_1,
    FUNC_SPLIT_OPT_7_2,
    FUNC_SPLIT_OPT_7_3,

    FUNC_SPLIT_OPT_8, //PHY-RF split
    FUNC_SPLIT_OPT_BUTT
};
extern const char* gFuncSplitOptNameTable[];

#define RAN_TTI_INT_PIPE_NAME    "o5g_ran_tti_int_pipe"

#define RAN_L2_2_L3_UDP_PORT     46010
#define RAN_L3_2_L2_UDP_PORT     46011

#define RAN_L2_CU_2_L3_UDP_PORT  46012
#define RAN_L3_2_L2_CU_UDP_PORT  46013

#define RAN_L2_DU_2_L3_UDP_PORT  46014
#define RAN_L3_2_L2_DU_UDP_PORT  46015

#endif //O5G_SRC_O5GRAN_LCORE_INCLUDE_COMMDEF_H_
